using MicroMsg.Common.Utils;
using MicroMsg.Storage;
using System;
using System.Diagnostics;
using System.Windows;
namespace MicroMsg.UI.UserContrl
{
	public class ChatTimeItem : BaseChatElement
	{
		private const string TAG = "ChatTimeItem";
		public static DependencyProperty StrTimeInfoProperty = DependencyProperty.Register("StrTimeInfo", typeof(string), typeof(ChatTimeItem), new PropertyMetadata("", new PropertyChangedCallback(ChatTimeItem.OnStrTimeInfoPropertyChanged)));
		private bool _contentLoaded;
		public string StrTimeInfo
		{
			get
			{
				return (string)base.GetValue(ChatTimeItem.StrTimeInfoProperty);
			}
			set
			{
				base.SetValue(ChatTimeItem.StrTimeInfoProperty, value);
			}
		}
		public ChatTimeItem()
		{
			this.InitializeComponent();
		}
		public override void OnApplyTemplate()
		{
			base.OnApplyTemplate();
		}
		public override void SetChatMsg(ChatMsg Msg)
		{
			base.SetChatMsg(Msg);
			if (Msg == null)
			{
				return;
			}
			this.StrTimeInfo = Util.formatTimeInChatMsg(this.chatMsg_0.nCreateTime);
		}
		private static void OnStrTimeInfoPropertyChanged(DependencyObject dependencyObject_0, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs_0)
		{
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/Chat/ChatListItem/ChatTimeItem.xaml", 2));
		}
	}
}
